package br.com.doclayer.cmis;

import java.util.Date;

import org.apache.chemistry.opencmis.client.api.Folder;

import br.com.doclayer.FolderMetadata;

/**
 * @author helder
 * @author glauco
 * 
 */
public class FolderCMISImpl implements FolderMetadata {

  @Override
  public String toString() {
    return "FolderCMISImpl [UUID=" + this.uuid + ", path=" + this.path
        + ", name=" + this.name + ", createdBy=" + this.createdBy
        + ", creationDate=" + this.creationDate + ", lastModifiedBy="
        + this.lastModifiedBy + ", lastModificationDate="
        + this.lastModificationDate + "]";
  }

  private String uuid;
  private String path;
  private String name;
  private String createdBy;
  private Date creationDate;
  private String lastModifiedBy;
  private Date lastModificationDate;

  public FolderCMISImpl(Folder folder) {
    this.uuid = folder.getId();
    this.path = folder.getPath();
    this.createdBy = folder.getCreatedBy();
    this.creationDate = folder.getCreationDate().getTime();
    this.lastModifiedBy = folder.getLastModifiedBy();
    this.lastModificationDate = folder.getLastModificationDate().getTime();
  }

  @Override
  public String getUuid() {
    return this.uuid;
  }

  @Override
  public String getPath() {
    return this.path;
  }

  @Override
  public String getName() {
    return this.name;
  }

  @Override
  public String getCreatedBy() {
    return this.createdBy;
  }

  @Override
  public Date getCreationDate() {
    return this.creationDate;
  }

  @Override
  public String getLastModifiedBy() {
    return this.lastModifiedBy;
  }

  @Override
  public Date getLastModificationDate() {
    return this.lastModificationDate;
  }

}
